# -*- coding: utf-8 -*-
<%inherit file="base.mako" />

<%def name="title()">File Information</%def>

<%def name="head_tags()">

</%def>


<script language="javascript">
var popupWindow = null;
function centeredPopup(url,winName,w,h,scroll){
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
settings =
'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable'
popupWindow = window.open(url,winName,settings)
}
</script>

% for f in fileInfo:
<h1>${f.filename}</h1>

<div id="Static">
<p class="Title">Static Analysis</p>

<p> <span class="descriptor">FileName: </span>
<span class="info">${f.filename}</span></p>

<p> <span class="descriptor">File Extension: </span>
<span class="info">${f.fileExt}</span></p>

<p class="descriptor">FileSize: </span>
<span class="info">${f.filesize}</span></p>

<p class="descriptor">MD5: </span>
<span class="info">${f.md5}</span></p>

<p class="descriptor">SHA256: </span>
<span class="info">${f.sha256}</span></p>

<p class="descriptor">SSDeep: </span>
<span class="info">${f.ssdeep}</span></p>

% endfor
<p class="Title">Yara Results</p>
<div class="main_Table" >

		<table>
				<tr>
					<td>Name</td>
					<td>Description</td>
				</tr>
% for y in yara:
				<tr>
					<td>${y.rule}</td>
					<td>${y.description}</td>
				</tr>
% endfor
		</table>
      </div>
</div>




<div id="Dynamic">
<p class="Title">Dynamic Analysis</p>
			<div id='filemenu'>
				<ul>
					<li class='has-sub last'><a href='#'><span>FireEye - MAS</span></a>
						<ul>
							<li><a href="/analyse?ID=${f.msg_id}&sandbox=MAS&profile=winxp-base&filename=${f.filename}" onclick="centeredPopup(this.href,'myWindow','200','100','yes');return false"><span>WinXP Base</span></a></li>
							<li><a href="/analyse?ID=${f.msg_id}&sandbox=MAS&profile=winxp-sp2&filename=${f.filename}" onclick="centeredPopup(this.href,'myWindow','200','100','yes');return false"><span>WinXP SP2</span></a></li>
							<li><a href="/analyse?ID=${f.msg_id}&sandbox=MAS&profile=winxp-sp3&filename=${f.filename}" onclick="centeredPopup(this.href,'myWindow','200','100','yes');return false"><span>WinXP SP3</span></a></li>
							<li><a href="/analyse?ID=${f.msg_id}&sandbox=MAS&profile=win7-base&filename=${f.filename}" onclick="centeredPopup(this.href,'myWindow','200','100','yes');return false"><span>Win7 Base</span></a></li>
							<li><a href="/analyse?ID=${f.msg_id}&sandbox=MAS&profile=win7-sp1&filename=${f.filename}" onclick="centeredPopup(this.href,'myWindow','200','100','yes');return false"><span>Win7 SP1</span></a></li>
						</ul>
					<li class='has-sub last'><a href='#'><span>Cuckoo</span></a>
						<ul>
							<li><a href='/help'><span>Submit</span></a></li>
							<li><a href='/decode'><span>Report</span></a></li>
						</ul>
					<li class='has-sub last'><a href='#'><span>Virus Total</span></a>
						<ul>
							<li><a href='/help'><span>Submit</span></a></li>
							<li><a href='/decode'><span>View</span></a></li>
						</ul>
				</ul>
			</div>

</div>
</div>


